package com.ziyun.erp.modules.userTeam.dao;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.ziyun.erp.modules.userTeam.entity.UserDistributionEntity;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * 分销表
 * 
 * @author jiangli
 * @email 
 * @date 2018-11-27 11:38:04
 */
public interface UserDistributionDao extends BaseMapper<UserDistributionEntity> {

    @Update("UPDATE user_distribution SET apply_type='leave' WHERE role_id=2 AND apply_type='added' AND team_id=#{teamId}")
    int leaveTeam(Integer teamId);

    List<String> checkUserDistribution(@Param("phoneList") String[] phoneList);
}
